package com.dwork.base.dictionary;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Dict {
	

	private Map<String,List<DataLabel>> dict = new HashMap<String, List<DataLabel>>();
	
	public Dict() {}  
	
	public Dict(Map<String,List<String>> map) {
		for (String category : map.keySet()) {
			dict.put(category, new ArrayList<DataLabel>());
			List<String> values = map.get(category);
			for (String dl : values) {
				String[] t = dl.split(":");
				DataLabel dataLabel = new DataLabel(t[0], t[1]);
				dict.get(category).add(dataLabel);
			}
		}
	}

	public Map<String, List<DataLabel>> getDict() {
		return dict;
	}
	
	
}
